<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <!-- <meta http-equiv="X-UA-Compatible" content="IE=edge"> -->

    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">

    <title>{:cache('web_name')}</title>

    <link rel="stylesheet" href="__MOBILE__/jscss/index.css">

    <link rel="stylesheet" href="__MOBILE__/jscss/css.css">

    <script type="text/javascript" src="__MOBILE__/jscss/w_rem.js" ></script>

    <script src="__MOBILE__/jscss/jquery.min.js"></script>

<script src="https://cdn.staticfile.org/axios/0.18.0/axios.min.js"></script></head>

<body style="background: #f8f8f8;">

    <div class="pay_top">

        <div class="pay_top_back" onclick="history.go(-1)"><img src="__MOBILE__/img/a15.png"></div>

        <div class="pay_top_title">{:cache('web_name')}</div>

        <div class="more_top3 clear">

            <div class="more_top3_left"><img src="__MOBILE__/img/a19.jpg"></div>

            <div class="more_top3_right">

                <div class="more_top3_right1" style="border: none;"><span style="font-weight: bold;">{$info.name}</span><span style="margin-left: 0.6rem;font-weight: bold;">{$info.mobile}</span></div>

                <div class="more_top3_right2">

                    {if $info.distribution_type_id == 2}

                     现场自提 无收获地址

                    {else/}

                    {$info.address}

                    {/if}

                </div>

            </div>

        </div>

    </div>

    <div class="order_all">
        {volist name="$info.package" id="vo2"}
        <!-- <div class="order_title wtw">

                      {eq name="$vo2.package_id" value="0"}

                      {$vo2.package_title}-{$vo2.package_total_price}元

                      {else/}

                      {$vo2.package_title}-{$vo2.package_price}x{$vo2.package_number}={$vo2.package_total_price}元

                      {/eq}

                  </div> -->
        {eq name="$vo2.package_id" value="0"}
        {volist name="$vo2.goods_list" id="vo3"}
        <div class="order_content_all clear">
            <div class="clear">

                <div class="more_content_all_left"><img src="{$vo3.single_pic}" width="100%" height="100%"></div>

                <div class="more_content_all_right">
                    <div class="clear">
                        <div class="pay_content_all_right1">{$vo3.title}</div>
                        <div class="pay_content_all_right2b">×{$vo3.number}</div>
                    </div>
                    <div class="more_content_all_right2 clear">
                        <div class="pay_content_all_right2a">￥{$vo3.price}</div>
                    </div>
                </div>
            </div>
        </div>
        {/volist}
        {else/}
            <div class="order_content_all clear">
                <div class="clear">

                    <div class="more_content_all_left"><img src="{$vo2.t_single_pic}" width="100%" height="100%"></div>

                    <div class="more_content_all_right">
                        <div class="clear">
                            <div class="pay_content_all_right1">{$vo2.package_title}</div>

                            <div class="pay_content_all_right2b">×{$vo2.package_number}</div>
                        </div>
                        
                        <div class="more_content_all_right2 clear">

                            <div class="pay_content_all_right2a">￥{$vo2.package_price}</div>

                            <div class="m-c i300"><img src="__MOBILE__/img/mc-1.png"><img src="__MOBILE__/img/mc-2.png"></div>

                        </div>
                    </div>

                </div>

                <div class="m-c-a clear">
                    <div class="m-c-a1">套餐内容：</div>
                    <div class="m-a-a2">
                        {volist name="$vo2.goods_list" id="vo3"}
                        <div class="m-a-a3 clear">
                            <div>x{$vo3.number}</div>
                            <div><img src="{$vo3.single_pic}"></div>
                            <div class="to3">{:strLength($vo3.title,16)}</div>
                            <div>￥{$vo3.price}</div>
                        </div>
                        {/volist}
                    </div>
                </div>

            </div>

        {/eq}


            {/volist}

            <div class="order_total clear">

                <div class="order_total1">合计 <span style="font-size: 0.36rem;">¥ <span>{$info.order_price}</span> </span></div>

                <div class="order_total2">共 <span>{$info.goods_count}</span> 个</div>

            </div>

    </div>



    <div class="more_msg">

        <div class="more_msg_a clear"><div class="more_msg_a1">订单编号：</div><div class="more_msg_a2">{$info.order_number}</div><div class="more_msg_a3"></div></div>
        <div class="more_msg_a clear"><div class="more_msg_a1">订单状态：</div><div class="more_msg_a2">{$info.status_text}</div><div class="more_msg_a3"></div></div>
        {if $info.distribution_type_id == 1 && $info.status >= 3}

        <div class="more_msg_a clear"><div class="more_msg_a1">运单号：</div><div class="more_msg_a2">{$info.express_number}</div><div class="more_msg_a3"></div></div>

        <div class="more_msg_a clear"><div class="more_msg_a1">配送物流：</div><div class="more_msg_a2">{$info.express_title}</div></div>


        {/if}

        <div class="more_msg_a clear"><div class="more_msg_a1">下单时间：</div><div class="more_msg_a2">{$info.create_time}</div></div>
        {if $info.distribution_type_id == 1}
        <div class="more_msg_a clear"><div class="more_msg_a1">省市区：</div><div class="more_msg_a2">{$info.prov} {$info.city} {$info.area}</div></div>
        <div class="more_msg_a clear"><div class="more_msg_a1">配送地址：</div><div class="more_msg_a2">{$info.address}</div></div>
        {/if}

        <div class="more_msg_a clear">

            <div class="more_msg_a1">配送方式：</div>

            <div class="more_msg_a2">{$info.distribution_type}</div>

            <div class="more_msg_a4">

                {if $info.distribution_type_id == 1 && $info.status >= 3}

                <a href="{:url('express',['order_number'=>$info.order_number])}">查看物流</a>

                {/if}
                {if $info.status == 3}
                <span onclick="shouhuo('{$info.order_number}')">确认收货</span>
                {/if}
                <div><img src="__MOBILE__/img/a21.png" width="100%" height="100%"></div>

            </div>

        </div>

    </div>

</body>

</html>
<script>

    function shouhuo(order_number) {
        $.ajax({
            type: "POST", //用POST方式传输
            dataType: "json", //数据格式:JSON
            url: "{:url('Index/shouhuo')}", //目标地址
            async: false,
            traditional :false,
            data:{order_number:order_number},
            success: function (ret) {
                console.log(ret);
                // alert(console.log(ret));
                if(ret.code == 200){

                  layer.msg('收货成功');
                  setTimeout(function () {
                    history.go(0);
                  },1000);

                }else{
                    layer.msg(ret.message);
                }
            }
        });
    }

</script>
<script>

    $(function(){

        $('.more_msg_a3').click(function(){

            var copy =  copyText($(this).prev().html())

            return copy

        })
        var mcstate = false;
        $('.m-c').click(function(){
            if(mcstate == false){
                $(this).addClass('on1');
                $(this).parents('.order_content_all').find('.m-c-a').slideDown(500);
                mcstate = true;
            }else{
                $(this).parents('.order_content_all').find('.m-c-a').slideUp(500);
                mcstate = false;
                $(this).removeClass('on1');
            }
        })
    })

</script>